<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="/ms-tags" prefix="ms"%>

<c:import url="/public/include/msDocType.html" />
<html>
<head>
<c:import url="/common/base-hplus-list.jsp" />
<script type="text/javascript" src="/js/system/role/t-mgt-role-list.js?version=${version }"></script>

</head>
<body>
  <form action="list.do" method="post" class="form-inline">
    <div class="ibox-content divSearchList" id="divSearchList">
   		<div class="form-group">
			<ms:input name="roleCode" value="${roleCode }" placeholder="角色编号" dataMark="*%" cssClass="input-sm form-control" />
		</div>
		<div class="form-group">
			<ms:input name="roleName" value="${roleName }" placeholder="角色名称" dataMark="*%" cssClass="input-sm form-control" />
		</div>
		<div class="form-group">
			<button id="btnListQuery" type="submit" class="btn btn-sm btn-primary">搜索</button>	
			<button type="button" class="btn btn-success btn-sm" onclick="toAdd();">添加</button>
		</div>
	</div>
    
    
<div class="ibox-content">
	<table class="table table-bordered">
      <thead>
        <tr>
          <th style="width:30%" id="ROLE_CODE">角色编号</th>
		  <th style="width:30%" id="ROLE_NAME">角色名称</th>
          <th style="width:20%">操作</th>
        </tr>
      </thead>
      <tbody>
        <c:forEach var="entity" items="${pl.list}" varStatus="s">
          <tr>
            <td style="text-align:left">${entity.roleCode}</td>
			<td style="text-align:left">${entity.roleName}</td>
            <td style="text-align:center">
            	<button type="button" class="btn btn-sm btn-primary" onClick="setRole('${entity.roleCode}');">权限设置</button>
				<button type="button" class="btn btn-sm btn-primary" onClick="toAdd('${entity.id}');">修改</button>
        		<button type="button" class="btn btn-danger btn-primary" onClick="toDelete('${entity.id}');">删除</button>
			</td>
          </tr>
        </c:forEach>
      </tbody>
    </table>

    <!-- 翻页 -->
    <c:import url="/public/include/changePage.jsp" />
        </div>
  </form>
  
  
</body>
</html>

